import { defineStore } from 'pinia'
import  { getMenuRList } from '@/composables/school'

export const useSchoolStore = defineStore('school', () => {
  const menuListData = ref()
  const getListData = async (level) => {
    return await getMenuRList(level).then(res => {
      menuListData.value = res.data
      return res.data
    })
  }
  return {
    menuListData,
    getListData
  }
},{
  persist: process.client && {
    storage: sessionStorage
  }
})